/*
 * @Author: Baishui
 * @Date: 2021-09-16 15:26:27
 * @LastEditors: Baishui
 * @LastEditTime: 2021-09-28 20:33:32
 * @Description: file content
 */

function getStepDataPX(start = 0, end = 10, step = 1) {
  const res = {}
  for (let i = start; i <= end; i += step) {
    res[i] = `${i}px`
  }

  return res
}
function getDoubleDataPX(start = 0, end = 10) {
  const res = {}
  for (let i = start; i <= end; i++) {
    res[i] = i !== 0 ? `${i * 2}px` : '0'
  }

  return res
}

module.exports = {
  // purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  mode: 'jit',
  purge: {
    enabled: process.env.NODE_ENV === 'production',
    content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  },
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {},
    fontSize: getStepDataPX(12, 30, 2),
    // fontSize: {
    //   12: '12px',
    //   14: '14px',
    //   16: '16px',
    //   18: '18px',
    //   20: '20px',
    // },

    // spacing: {
    //   0: '0',
    //   1: '2px',
    //   2: '4px',
    //   3: '6px',
    //   4: '8px',
    //   5: '10px'
    // },

    // width height margin padding
    spacing: getDoubleDataPX(0, 20),
  },
  variants: {
    extend: {},
  },
  plugins: [],
}
